package com.codingyun.core.dto;

import java.util.ArrayList;
import java.util.ListIterator;

import javax.annotation.Resource;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.OrderComparator;
import org.springframework.stereotype.Component;



public class TArrayList<T> extends ArrayList  implements InitializingBean,MatchBean<T> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	 public void afterPropertiesSet() throws Exception {
	        if (!isEmpty()) {
	            Object[] a = toArray();
	            OrderComparator.sort(a);
	            ListIterator i = listIterator();
	            for (int j=0; j<a.length; j++) {
	                i.next();
	                i.set(a[j]);
	            }
	        }
	    }


	@Override
	public boolean matching(T factor) {
		// TODO Auto-generated method stub
		return false;
	}

	
	
	
	

}
